package com.wayeal.word.check;

import com.wayeal.word.FreeMarkerUtil;

import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;

/**
 * @author chen.chao
 * @version 2021-08-18 15:12
 */
public class RecheckTest {

    public static void main(String[] args) {

        Map<String,Object> data = new HashMap<>();

        List<CheckDriftModel> driftList = new ArrayList<>();


        CheckDriftModel SO2 = new CheckDriftModel("SO2","0.4","0.24","0.40%","0.24%");
        CheckDriftModel NO = new CheckDriftModel("NO","0.4","0.24","0.40%","0.24%");
        CheckDriftModel O2 = new CheckDriftModel("O2","0.4","0.24","0.40%","0.24%");

        List<CheckDriftTableModel> tableList = new ArrayList<>();
//        List<CheckDriftTableModel> NOTableData = new ArrayList<>();
//        List<CheckDriftTableModel> O2TableData = new ArrayList<>();

        for(int i = 20;i<25;i++){
            CheckDriftTableModel tableModel = new CheckDriftTableModel("2020/4/"+i,"10:23","0.02","0.02","0","0.00%","60.05","59.91","-0.14","-0.22%");
            tableList.add(tableModel);
//            NOTableData.add(tableModel);
//            O2TableData.add(tableModel);
        }

        SO2.setTableList(tableList);
        NO.setTableList(tableList);
        O2.setTableList(tableList);

        driftList.add(SO2);
        driftList.add(NO);
        driftList.add(O2);

        data.put("drift",driftList);
        data.put("适度",driftList);
        data.put("适度",driftList);

        FreeMarkerUtil.crateFile(data,"/recheck/漂移检测.ftl","/outFile/recheck/漂移检测.doc");

    }
}
